Debian 9 Stretch
Sponsored Link

Install Clam AntiVirus
2017/06/20
 
Install Clam AntiVirus to protect server from virus.
[1] Install Clamav.
root@dlp:~#
apt -y install clamav
root@dlp:~#
sed -i -e "s/^NotifyClamd/#NotifyClamd/g" /etc/clamav/freshclam.conf
# update pattern files

root@dlp:~#
freshclam

ClamAV update process started at Tue Jun 20 11:38:17 2017
Downloading main.cvd [100%]
main.cvd updated (version: 58, sigs: 4566249, f-level: 60, builder: sigmgr)
Downloading daily.cvd [100%]
daily.cvd updated (version: 23489, sigs: 1736840, f-level: 63, builder: neo)
Downloading bytecode.cvd [100%]
bytecode.cvd updated (version: 303, sigs: 59, f-level: 63, builder: anvilleg)
Database updated (6303148 signatures) from db.local.clamav.net (IP: 203.212.42.128)
[2] Try to scan.
root@dlp:~#
clamscan --infected --remove --recursive /home


----------- SCAN SUMMARY -----------
Known viruses: 6297599
Engine version: 0.99.2
Scanned directories: 2
Scanned files: 3
Infected files: 0
Data scanned: 0.00 MB
Data read: 0.00 MB (ratio 0.00:1)
Time: 9.504 sec (0 m 9 s)

# download test virus

root@dlp:~#
wget http://www.eicar.org/download/eicar.com
root@dlp:~#
clamscan --infected --remove --recursive ./

./eicar.com: Eicar-Test-Signature FOUND
./eicar.com: Removed.    
# just detected
----------- SCAN SUMMARY -----------
Known viruses: 6297599
Engine version: 0.99.2
Scanned directories: 1
Scanned files: 5
Infected files: 1
Data scanned: 0.00 MB
Data read: 0.00 MB (ratio 0.00:1)
Time: 9.299 sec (0 m 9 s)
 
Tweet